import { MockMethod } from 'vite-plugin-mock'
import Mock from 'mockjs'
const tableData = Mock.mock({
    'list|10': [{
        'id|+1': 1,
        'name': '@cname',
        'age|18-60': 1,
        'gender|1': ['男', '女'],
        'disable|1': [true, false],
        'tag|1': ['java', 'react']
    }]
})


export default [
    {
        // 获取用户信息的接口
        url: '/api/getTableData',
        method: 'get',
        response: () => {
            return {
                code: 200,
                message: '获取成功',
                data: tableData.list
            }
        }
    },
] as MockMethod[]
